import request from '@/utils/request'

// 创建入库单明细
export function createEntryOrderDetail(data) {
  return request({
    url: '/hs/entry-order-detail/create',
    method: 'post',
    data: data
  })
}

// 更新入库单明细
export function updateEntryOrderDetail(data) {
  return request({
    url: '/hs/entry-order-detail/update',
    method: 'put',
    data: data
  })
}

// 删除入库单明细
export function deleteEntryOrderDetail(id) {
  return request({
    url: '/hs/entry-order-detail/delete?id=' + id,
    method: 'delete'
  })
}

// 获得入库单明细
export function getEntryOrderDetail(id) {
  return request({
    url: '/hs/entry-order-detail/get?id=' + id,
    method: 'get'
  })
}

// 获得入库单明细分页
export function getEntryOrderDetailPage(params) {
  return request({
    url: '/hs/entry-order-detail/page',
    method: 'get',
    params
  })
}
// 导出入库单明细 Excel
export function exportEntryOrderDetailExcel(params) {
  return request({
    url: '/hs/entry-order-detail/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}